#ifndef _PILINK_BOOT_H_
#define _PILINK_BOOT_H_

#include "pilink_core.h"

#define PILINK_TYPE_BOOT_CMD              (PILINK_CLASS_BOOT + 0x01)
#define PILINK_TYPE_BOOT_DATA             (PILINK_CLASS_BOOT + 0x02)
#define PILINK_TYPE_BOOT_ACK              (PILINK_CLASS_BOOT + 0x03)

#pragma pack(1)

#define PILINK_TYPE_BOOT_CMD_ABORT_BOOT   0x0001
#define PILINK_TYPE_BOOT_CMD_RESTART      0x0002
#define PILINK_TYPE_BOOT_CMD_BOOT         0x0003
#define PILINK_TYPE_BOOT_CMD_ERASE        0x0004
#define PILINK_TYPE_BOOT_CMD_STA_UGD      0x0005
#define PILINK_TYPE_BOOT_CMD_END_UGD      0x0006 

struct pilink_struct_boot_cmd_s
{
    unsigned int  cmd;
    unsigned int  param[3];
};

struct pilink_struct_boot_data_s
{
    unsigned int   addr;
    unsigned int   data;
};

struct pilink_struct_boot_ack_s
{
    unsigned int   addr;
    unsigned int   data;
};

#pragma pack()


#endif
